package bmatch.tech.file.service.impl;

import bmatch.tech.file.model.Files;
import bmatch.tech.file.model.MyDirectory;
import bmatch.tech.file.model.MyFile;
import bmatch.tech.file.model.Response;
import bmatch.tech.file.service.CloudService;
import bmatch.tech.file.util.DataStore;
import bmatch.tech.file.util.Query;

import java.util.ArrayList;
import java.util.List;

/**
 * CloudServiceImpl的注释
 *
 * @author: Awake
 * @date: 2018-12-02 11:56
 **/
public class CloudServiceImpl implements CloudService {
    @Override
    public Response display(String userId, String path) {

        Files files = new Files();
        files.setDirectories(Query.queryDirectoriesByPath(userId, path));
        files.setFiles(Query.queryFilesByPath(userId, path));

        Response response = new Response();
        response.setCode(Response.RESPONSE_OK);
        response.setData(files);
        response.setMessage("Display Finished");

        return response;
    }
}
